package com.ykq.controller;

import com.ykq.service.RoleService;
import com.ykq.vo.R;
import com.ykq.vo.RoleSearchVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: qy174-mrcai
 * @description:
 * @author: 闫克起
 * @create: 2024-06-06 08:51
 **/
@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private RoleService roleService;

    @PostMapping("/list")
    public R list(Integer current, Integer pageSize, @RequestBody RoleSearchVo roleSearchVo){
        return roleService.findByConditionPage(current, pageSize, roleSearchVo);
    }

    @PutMapping("updateStatus")
    public R updateStatus(Long id,Integer status){
        return roleService.updateStatus(id,status);
    }

}











